<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>分解质因数</title>
</head>
<body>
    <script>
        var sum = +prompt("请输入一个整数");
        for(var i=2; i<sum ; i++){
            if(sum%i==0){
                document.write(i+"*")
                sum /= i;
                i-=1;
            }
        }
        document.write(sum);
    </script>
</body>
</html>